package com.shigu.passageway;

import com.shigu.passageway.bo.RegistBO;
import com.shigu.passageway.exceptions.PassagewayException;

/**
 * 通道
 */
public interface Passageway {
    /**
     * 注册商户+进件
     * @return
     */
    String regist(RegistBO bo) throws PassagewayException;

    /**
     * 更新进件信息
     * @return
     * @throws PassagewayException
     */
    String updateInfo(RegistBO bo) throws PassagewayException;
    /**
     * 预下单
     * @return
     */
    String toPay(Long userId,Long creditCardId,Double withdrawalMoney) throws PassagewayException;

    /**
     * 支付完成回调
     * 返回结算ID
     */
    void payCallBack(Long orderId,Double amount,Double fee,String paystatus) throws PassagewayException;

    /**
     * 设置费率
     * 普通代理使用的方法
     */
    void setFee(Long agentId,Long businessId,Double rate,Double settleMoney) throws PassagewayException;

    /**
     * 系统及超级管理用的
     * @param rate
     * @throws PassagewayException
     */
    void superSetFee(Long userId,Double rate,Double limitRate,Double settleMoney) throws PassagewayException;

    /**
     * 得到系统的成本费率
     * @return
     */
    Double getSystemRate();


}
